<!-- 考试管理 -->
<div class="manageTitle">
	考试管理
</div>

<div class="content" ng-controller="examinationManage">
	<div class="addBtn">
		<span class="title">交卷时间</span>
		<div class="input-group m-b col-sm-2 addTitle">
		    <div class="input-group-btn">
		        <button type="button" class="btn btn-default" ng-click="openAssignmentTime($event);">
		        	{{startTime}}<span class="wavyLine">~</span>{{endTime}}
		            <span class="caret"></span>
		        </button>
		        <ul class="dropdown-menu dateSelect" ng-click="openAssignmentTime($event);">
		            <div class="form-group">
		                <div ng-model='timepickerTest' ng-time class="input-group date form_date col-md-5"
		                data-date="" data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
		                data-link-format="yyyy-mm-dd">
		                    <input class="form-control" size="16" type="text" value="" readonly ng-model="startTime">
		                    <span class="input-group-addon">
		                        <span class="glyphicon glyphicon-calendar"></span>
		                    </span>
		                </div>
		            </div>
		            <span class="wave">
		                ~
		            </span>
		            <div class="form-group">
		                <div ng-model='timepickerTest' ng-time class="input-group date form_date col-md-5 marginLeft"
		                data-date="" data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
		                data-link-format="yyyy-mm-dd">
		                    <input class="form-control" size="16" type="text" value="" readonly ng-model="endTime">
		                    <span class="input-group-addon">
		                        <span class="glyphicon glyphicon-calendar"></span>
		                    </span>
		                </div>
		            </div>

		            <a href="javascript:;" class="baseBtn" ng-click="closeAssignmentTime($event);">确定</a>
		        </ul>
		    </div>
		</div>

		<div class="searchContent">
			<span class="title">搜索内容</span>
			<div class="input-group m-b">
			    <div class="input-group-btn dropdown" dropdown="">
			        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
			        aria-expanded="false">
			            {{nowSearchKey.name}}
			            <span class="caret">
			            </span>
			        </button>
			        <ul class="dropdown-menu">
			            <li ng-repeat="item in searchKey" ng-click="selectSearchKey(item);">
			                <a href="javascript:;">
			                    {{item.name}}
			                </a>
			            </li>
			        </ul>
			    </div>
			</div>
		</div>

		<div class="search">
			<input type="text" placeholder="请输入关键词进行查询搜索" ng-model="searchVal" ng-change="getList();">
			<a href="javascript:;">搜索</a>
		</div>
	</div>

	<div class="table">
		<table>
			<thead>
				<tr>
					<th>考试ID</th>
					<th>试卷名称</th>
					<th>用户账号</th>
					<th>分数</th>
					<th>交卷时间</th>
					<th>详情</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in examList">
					<td>{{item.id}}</td>
					<td>{{item.pname}}</td>
					<td>{{item.account}}</td>
					<td>{{item.score}}</td>
					<td>{{item.create_time}}</td>
					<td class="operation" ng-click="viewDetails(item);">
						<span>查看详情</span>
					</td>
				</tr>
				<tr ng-if="noData">
					<td colspan="6"><img src="../img/noData.png" class="height"></td>
				</tr>
			</tbody>
		</table>
		<ul class="pagination"></ul>
	</div>
</div>

<!-- 查看详情 -->
<script type="text/ng-template" id="viewDetails.html">
	<div class="panel-body newExamPaper">
	    <form class="form-horizontal border">
	    	<p class="title viewDetails">查看详情<span ng-click="cancel();">&times;</span></p>
	    	
	    	<table class="details">
	    		<tbody>
	    			<tr class="hasHeight">
	    				<td class="hasWidth">对题数</td>
	    				<td class="hasBorder">{{rightNum}}</td>
	    			</tr>
	    			<tr class="hasHeight">
	    				<td class="hasWidth">错题数</td>
	    				<td class="hasBorder">{{errorNum}}</td>
	    			</tr>
	    			<tr style="height: 56px;">
	    				<td class="hasWidth"><span>题目</span></td>
	    				<td class="hasBorder hasAnswer">
							<div ng-repeat="item in detail">
								<p class="topicInfo">
									<span class="type" ng-if="item.type==1">(单选题)</span>
									<span class="type" ng-if="item.type==2">(多选题)</span>
									<span class="type" ng-if="item.type==3">(判断题)</span>
									{{$index+1}}、
									<span ng-bind-html="item.title" class="info"></span>
									（）
								</p>
								<ol>
									<li ng-bind-html="option.option_val" ng-repeat="option in item.opt"></li>
								</ol>

								<p class="answer">
									<span class="right">正确答案是：<span>{{item.right_answer}}</span></span>
									<span class="userAnswer">用户选择答案是：<span>{{item.user_answer}}</span></span>

									<a href="javascript:;" ng-if="item.is_true==0"><img src="../img/error.png"></a>
									<a href="javascript:;" ng-if="item.is_true==1"><img src="../img/right.png"></a>
								</p>
							</div>
	    				</td>
	    			</tr>
	    		</tbody>
	    	</table>
	    </form>
	</div>
</script>